package com.ruoyi.tiktok.domain.vo;


import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.tiktok.configs.modelConfig;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

import java.util.List;
import java.util.Map;

@Data
public class LaunchAppSchema {

    private static final long serialVersionUID = 1L;
    private String title;
    private String shareType;
    private String clientKey;
    private String nonceStr;
    private String timestamp;
    private String signature;
    private String state;
    private String imagePath;
    private List<String> imageListPath;
    private String videoPath;
    private List<String> hashTagList;
    private String microAppInfo;
    private int shareToPublish; // 1 分享到发布页
    private String poiId;
    private int shareToType; //0 投稿 ，1 转发日常
    private String shortTitle; //短标题
    private int downloadType;  // 1，可以下载 。 2 不能下载
    private int privateStatus;// 0，1，2
    private String feature; // note 普通投稿




    public static LaunchAppSchema baseLaunchAppSchema(Map baseInfoMap){
        LaunchAppSchema launchAppSchema = new LaunchAppSchema();
        launchAppSchema.shareType = "h5"; // 必填项
        launchAppSchema.nonceStr =  (String) baseInfoMap.get("nonce_str"); // 必填项
        launchAppSchema.timestamp = (String) baseInfoMap.get("timestamp"); // 必填项
        launchAppSchema.signature = (String) baseInfoMap.get("signature"); // 必填项
        launchAppSchema.clientKey = (String) baseInfoMap.get("clientKey"); // 必填项
        launchAppSchema.downloadType = 2;// 不允许下载

        return  launchAppSchema;
    }

}

